<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="style.css" />
    <style>
      /* body{
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100vh;
      width:100vw;
      overflow: hidden;
    } */

      svg {
        border: 2px solid black;
      }
      #rect {
        transform-origin: 300px 100px;
      }
    </style>
  </head>

  <body>
    <svg width="420" height="420" viewBox="0 0 420 420" fill="none" xmlns="http://www.w3.org/2000/svg">
      <circle cx="210" cy="210" r="210" fill="#D9D9D9" />
    </svg>

    <svg width="600" height="200" viewBox="0 0 600 200" xmlns="http://www.w3.org/2000/svg">
      <!-- 第一个矩形：平移动画 -->
      <rect x="50" y="50" width="100" height="100" fill="blue">
        <animateTransform attributeName="transform" type="translate" from="0 0" to="200 0" dur="3s" repeatCount="indefinite" />
      </rect>

      <!-- 第二个矩形：缩放动画 -->
      <rect id="rect" x="250" y="50" width="100" height="100" fill="green">
        <animateTransform attributeName="transform" type="scale" from="1" to="2" dur="3s" repeatCount="indefinite" />
      </rect>

      <!-- 第三个矩形：旋转动画 -->
      <rect x="450" y="50" width="100" height="100" fill="red">
        <!-- 500 100是旋转中心点 -->
        <animateTransform attributeName="transform" type="rotate" from="0 500 100" to="360 500 100" dur="3s" repeatCount="indefinite" />
      </rect>
    </svg>
  </body>
</html>
